package com.citybox.infrastructure.wx.persistence.service;

import com.citybox.domain.wx.*;
import com.citybox.shared.web.domain.R;
import org.springframework.stereotype.Service;

@Service
public interface WxService {

    /**
     * 微信登陆
     * @param code
     * @return
     */
    R<WechatSessionDo> jsCode2Session(String code);

     boolean checkSignature(String rawData, String sessionKey, String signature);

    /**
     * 登陆
     * @param request
     * @return
     */
    R<LoginResultDo> wechatLogin(LoginRequestDo request);

    /**
     * 刷新token
     * @param request
     * @return
     */
    R<TokenRefreshResultDo> refreshToken(TokenRefreshRequestDo request);

    /**
     * 获取用户手机号
     * @param code
     * @return
     */
    R<String> getUserPhoneNumber(String code);
}
